package com.just.springbootmybatis.mapper;

import com.github.pagehelper.Page;
import com.just.springbootmybatis.model.User;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //分页和不分页的查询可以更优雅一点，重用sql，这个再考虑怎么搞
    List<User> findAll();

    Page<User> findAllByPage();
}